<?php
	session_start();
	$logout=$_REQUEST['logout'];
	if(isset($_REQUEST['logout'])){
		$_SESSION['result']['status']=false;
		$str = json_encode($_SESSION);
		session_destroy();
	}
	else{
		if(isset($_REQUEST['email'])&&isset($_REQUEST['password'])){
			$_SESSION['result']['data']['email'] = $_REQUEST['email'];
			$_SESSION['result']['data']['password'] = $_REQUEST['password'];
			if(($_SESSION['result']['data']['email']=='admin@root')&&($_SESSION['result']['data']['password']=='1234')){
				$_SESSION['result']['status']=true;
			}
			else{
				$_SESSION['result']['status']=false;
			}
		}
	}
	$str = json_encode($_SESSION);
	echo $str;
?>
